package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.InvoiceGroupMapper;
import com.ruoyi.system.domain.InvoiceGroup;
import com.ruoyi.system.service.IInvoiceGroupService;

/**
 * 产品分类Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-04-25
 */
@Service
public class InvoiceGroupServiceImpl implements IInvoiceGroupService 
{
    @Autowired
    private InvoiceGroupMapper invoiceGroupMapper;

    /**
     * 查询产品分类
     * 
     * @param id 产品分类主键
     * @return 产品分类
     */
    @Override
    public InvoiceGroup selectInvoiceGroupById(Long id)
    {
        return invoiceGroupMapper.selectInvoiceGroupById(id);
    }

    /**
     * 查询产品分类列表
     * 
     * @param invoiceGroup 产品分类
     * @return 产品分类
     */
    @Override
    public List<InvoiceGroup> selectInvoiceGroupList(InvoiceGroup invoiceGroup)
    {
        return invoiceGroupMapper.selectInvoiceGroupList(invoiceGroup);
    }

    /**
     * 新增产品分类
     * 
     * @param invoiceGroup 产品分类
     * @return 结果
     */
    @Override
    public int insertInvoiceGroup(InvoiceGroup invoiceGroup)
    {
        return invoiceGroupMapper.insertInvoiceGroup(invoiceGroup);
    }

    /**
     * 修改产品分类
     * 
     * @param invoiceGroup 产品分类
     * @return 结果
     */
    @Override
    public int updateInvoiceGroup(InvoiceGroup invoiceGroup)
    {
        return invoiceGroupMapper.updateInvoiceGroup(invoiceGroup);
    }

    /**
     * 批量删除产品分类
     * 
     * @param ids 需要删除的产品分类主键
     * @return 结果
     */
    @Override
    public int deleteInvoiceGroupByIds(Long[] ids)
    {
        return invoiceGroupMapper.deleteInvoiceGroupByIds(ids);
    }

    /**
     * 删除产品分类信息
     * 
     * @param id 产品分类主键
     * @return 结果
     */
    @Override
    public int deleteInvoiceGroupById(Long id)
    {
        return invoiceGroupMapper.deleteInvoiceGroupById(id);
    }

    @Override
    public List<String> selectProductCode() {
        return invoiceGroupMapper.selectProductCode();
    }

    @Override
    public int insertInvoiceGroups(List<InvoiceGroup> invoiceGroups) {
        return invoiceGroupMapper.insertInvoiceGroups(invoiceGroups);
    }
}
